1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a program to execute the image processing method. More specifically, the present invention relates to image processing apparatus and method which perform, as a pseudo-halftone process, an error diffusion process to multivalued image data, and a program to execute the image processing method.
2. Related Background Art
Conventionally, an error diffusion method which is described in, e.g., “An Adaptive Algorithm for Spatial Gray Scale” in Society for Information Display 1975 Symposium Digest of Technical Papers, 1975, pp. 36 is known as a pseudo-gradation process to represent a multivalued image by binary data. In this method, it is first assumed that a target pixel is P, a density of the target pixel P is v, densities of peripheral pixels P0, P1, P2 and P3 of the target pixel P are respectively v0, v1, v2 and v3, and a threshold for binarization is T. Then, a binarization error E at the target pixel P is diffused to the peripheral pixels P0, P1, P2 and P3 respectively with experientially obtained weighting factors W1, W1, W2 and W3, whereby an average density is macroscopically equated with the density of the former image.
For example, if it is assumed that output binary data is o, it is possible to represent:if v≧T, then o=1, E=v−Vmax if v<T, then o=0, E=v−Vmin  (1)(Vmax: maximum density, Vmin: minimum density)v0=v0+E×W0  (2)v1=v1+E×W1  (3)v2=v2+E×W2  (4)v3=v3+E×W3  (5)(examples of weighting factors: W0= 7/16, W1= 1/16, W2= 5/16, W3= 3/16)
Conventionally, for example, in a case where a color ink-jet printer or the like outputs a multivalued image by using C (cyan), M (magenta), Y (yellow) and K (black) inks, the pseudo-gradation process is independently performed for each color by using the error diffusion method or the like. Thus, even if a visual characteristic is excellent for one color, such an excellent visual characteristic is not necessarily obtained for a combination of two or more colors.
In order to solve such a problem, for example, Japanese Patent Application Laid-Open Nos. 8-279920 and 11-10918 disclose a pseudo-halftone processing method which can obtain, even if two or more colors are combined to be used, an excellent visual characteristic by combining the error diffusion methods for these colors.
Furthermore, Japanese Patent Application Laid-Open No. 9-139841 discloses a method which can obtain, even if two or more colors are combined to be used, an excellent visual characteristic by performing a pseudo-halftone process independently for each of these colors and then correcting an output value based on the sum total of processed input values.
Particularly, in order to reduce graininess of the intermediate density area in a color image, it is known that it is effective to perform image formation not to overlap dots of C and M components. In this connection, the following technique is used to achieve such a reduction of graininess. FIG. 16 is a view for explaining image formation control according to a conventional ink-jet recording method.
In this case, it should be noted that the image formation control will be explained on the premise that image data is the multivalued data of eight bits (0 to 255 gradation values) for each density component (Y, M, C, K) in relation to each pixel.
If the density values of the C and M components of the target pixel in a multivalued color image are assumed respectively as Ct and Mt and the density values of the C and M components of the original image are assumed respectively as C and M, equations Ct=C+Cerr and Mt=M+Merr are satisfied. Here, the symbols Cerr and Merr are the values obtained by respectively performing the error diffusion to the C and M components of the target pixel.
With respect to the image formation of the C and M components shown in FIG. 16, following four kinds of image formation controls are performed in accordance with the densities of the C and M components of the target pixel.    1. If the sum (Ct+Mt) is equal to or less than a threshold (Threshold1), that is, if it belongs to an area R1 of FIG. 16, the dot recording using the C and M inks is not performed.    2. If the sum (Ct+Mt) exceeds the threshold (Threshold1) and is less than another threshold (Threshold2) and Ct>Mt, that is, if it belongs to an area R2 of FIG. 16, the dot recording is performing by using only the C ink.    3. If the sum (Ct+Mt) exceeds the threshold (Threshold1) and is less than the threshold (Threshold2) and Ct≦Mt, that is, if it belongs to an area R3 of FIG. 16, the dot recording is performing by using only the M ink.    4. If the sum (Ct+Mt) is equal to or higher than the threshold (Threshold2), that is, if it belongs to an area R4 of FIG. 16, the dot recording is performing by using the C and M inks.
In the above image information controls, it is assumed that Threshold1<Threshold2 is satisfied.
However, in the conventional technique, according as the number of gradations in case of the quantization increases, a judgment expression becomes complicated and thus a processing time is prolonged.
Here, an example of a case where each of the C and M components is quantized into three values will be shown as follows.
Ct = C + CerrMt = M + MerrCout = 0Mout = 0If (Ct + Mt > Threshold1)If (Ct + Mt > Threshold1)If (Ct > Mt)Cout = 1elseMout = 1elseIf (Ct + Mt < Threshold2)If (Ct > Mt + Const1)Cout = 2elseIf (Mt > Ct + Const1)Mout = 2elseCout = 1Mout = 1elseIf (Ct + Mt < Threshold3)If (Ct > Mt)Cout = 2Mout = 1elseCout = 1Mout = 2elseCout = 2Mout = 2
As above, such a complicated process is necessary even to only quantize the color component into three values, whereby further complicated processes are necessary to quantize the color component into a larger number of gradation values.
Furthermore, if it is controlled to not overlap two or more colors as performing the multivalued error diffusion process, a difference (i.e., improper dislocation) of the positions where dots are respectively formed when the ink droplets are actually output and applied thereto by the printer occurs. Thus, a following problem to be solved occurs in the image. Hereinafter, the problem will be explained with reference to FIGS. 17A, 17B, 18A and 18B. FIGS. 17A and 17B show the output images of the highlight portion for explaining the conventional problem to be solved, and FIGS. 18A and 18B show the output images of the halftone portion for explaining the conventional problem to be solved.
More specifically, FIG. 17A shows a resultant example of the paper face where the printer outputs of two colors according to the simultaneous error diffusion in the highlight portion are formed, and, in FIG. 17A, a dot (dotted circle) 601 represents the C ink dot, and a dot (hatched circle) 602 represents the M ink dot. In the resultant example shown in FIG. 17A, the paper face is evenly infilled with the C ink dots 601 and the M ink dots 602, whereby this resultant example represents an excellent image. On the contrary, FIG. 17B shows a case where the C ink dot group of FIG. 17A has been entirely shifted leftward by the distance substantially the same as the dot diameter. In this case, although there are certain differences in the dot arrangements on the paper face, since the C ink dot 601 and the M ink dot 602 do not yet overlap mutually, an area factor which represents a ratio of the ink covering the paper face does not change.
FIG. 18A shows a resultant example of the paper face where the printer outputs of two colors according to the simultaneous error diffusion in the halftone portion are formed, and, in FIG. 18A, a dot (dotted circle) 701 represents the C ink dot, and a dot (hatched circle) 702 represents the M ink dot. In the resultant example shown in FIG. 18A, the paper face is evenly infilled with the C ink dots 701 and the M ink dots 702, whereby this resultant example represents an excellent image. On the contrary, FIG. 18B shows a case where the C ink dot group of FIG. 18A has been entirely shifted leftward by the distance substantially the same as the dot diameter. In this case, unlike with the transition from FIG. 17A to FIG. 17B, the C ink dots 701 and the M ink dots 702 overlap frequently, whereby the area factor which represents the ratio of the ink covering the paper face highly changes.
The change of the area factor is easily recognized or viewed as a great difference by human's eyes. Besides, as the reasons why the difference between the C ink dot position and the M ink dot position occurs, with respect to the main scan direction, for example, vibration of a carriage motor, deflation of a medium such as paper or the like to which an image is output, expansion and secular changes of the medium due to ink absorption of the medium itself, differences in discharge speeds of the respective color inks, and the like are cited. On the other hand, with respect to the sub scan direction, for example, uneven paper feed due to eccentricity of paper feed rollers or gears, unsteady movement of the upper and/or lower edges of paper, and the like are cited.
The above reasons include many factors which are changed according to the position of the medium to which the output is performed. Therefore, if the area factor changes according to the position of the medium, such a change of the area factor is recognized as great unevenness in the output image.